#ifndef __IMU_H
#define __IMU_H
#include "mpu6050.h"
typedef struct{
    float  pitch;
    float  roll;
    float  yaw;
}IMU_data;

typedef struct 
{
    float q0;
    float q1;
    float q2;
    float q3;
    float ex;
    float ey;
    float ez;
    float accex;
    float accey;    
    float accez;
    float k1;
    float k2;
    float ax_filt;//低通滤波后的ax
    float ay_filt;//低通滤波后的ay
    float az_filt;//低通滤波后的az
    float alpha;//低通滤波系数
    float integral_limit; // 积分限幅
}MahonyData_t;

void Time1_init(void);
void MahonyUpdate(MPU6050_Data* data, float dt);
IMU_data* imu_get_data();
#endif